package com.lzb.permanentcalendar.adapter;

import android.text.TextUtils;
import android.widget.TextView;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.lzb.permanentcalendar.R;
import com.lzb.permanentcalendar.bean.CityBean;

import java.util.List;

//队列列表
public class CitySearchAdapter extends BaseQuickAdapter<CityBean, BaseViewHolder> {





    public CitySearchAdapter(int layoutResId, @Nullable List<CityBean> data) {
        super(layoutResId, data);

    }


    @Override
    protected void convert(BaseViewHolder helper, CityBean item) {
        TextView tv1 = helper.getView(R.id.tv1);
        TextView tv2 = helper.getView(R.id.tv2);
        TextView tv3 = helper.getView(R.id.tv3);
        if (!TextUtils.isEmpty(item.getProvincialName())){
            tv1.setText(item.getProvincialName());
        }if (!TextUtils.isEmpty(item.getCityName())){
            tv2.setText(item.getCityName());
        }if (!TextUtils.isEmpty(item.getDistrictName())){
            tv3.setText(item.getDistrictName());
        }
    }




}

